#!/usr/bin/python

import curses
import time

stdscr = curses.initscr()
curses.cbreak()
curses.noecho()
stdscr.keypad(1)

try:
    # Run your code here

    # Print Hello World along the top
    stdscr.addstr(0, 10, "Hello World")

    stdscr.refresh()
    key = 'X'
    while key != ord('q'):
        stdscr.addstr(1, 10, "Hello World")
        stdscr.addstr(2, 10, "Hello World")
        stdscr.refresh()
        time.sleep(0.5)
finally:
    curses.nocbreak()
    stdscr.keypad(0)
    curses.echo()
    curses.endwin()